package com.xyulu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author lumin
 * @since 2021-02-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("blog_comments")
public class BlogCommentsEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 博文id
     */
    private Integer articleId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建者ID
     */
    private Integer createBy;

    /**
     * 创建者姓名
     */
    @TableField(exist = false)
    private String username;

    /**
     * 回复谁
     */
    private Integer replyTo;

    /**
     * 得到的回复数
     */
    private Integer replyNum;

    /**
     * 回复
     */
    @TableField(exist = false)
    private List<BlogCommentsEntity> replyComments;

    @TableField(exist = false)
    private String parentUserName;

    /**
     * 1可见 0不可见
     */
    private Integer isView;
}
